package ptumall.dao.shop;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import ptumall.model.shop.Category;
import ptumall.model.shop.GoodsCategory;

import java.util.List;

@Mapper
public interface GoodsCategoryDao extends BaseMapper<GoodsCategory> {

    @Select("SELECT id, name FROM goods_category WHERE status = 1 ORDER BY sort DESC")
    List<Category> selectActiveCategories();
}